package com.itheima.demo;

import com.itheima.domain.User;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @param
 * @return
 */
public class Demo2 {
    public static void main(String[] args) {
        //创建IOC容器
        ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext("spring1.xml");
        //容器对象获取类对象
        User user = ac.getBean("user", User.class);
        System.out.println(user.getUsername());
        System.out.println(user.getAge());
        System.out.println(user.getBirthday());
        System.out.println(user.getAddress());
        System.out.println(user.getList().size());
        System.out.println(user.getArray().length);
        System.out.println(user.getSet().size());
        System.out.println(user.getMap());
        System.out.println(user.getProps());
        System.out.println(user.getAddressList());
        System.out.println(user.getAddressMap());
    }
}
